package com.stepin2it.advancedcalculator;

public class CalculatorBrain
{
	public int add(int a, int b)
	{
		return a + b;
	}
	public float average(int a, int b)
	{
		return (a + b) / 2;
	}
	public int sub(int a, int b)
	{
		return a - b;
	}
	public int multiply(int a, int b)
	{
		int c = (a * b);
		return c;
	}
	public float divide(int a, int b)
	{
		if (b != 0)
		{
			float c = a / b;
			return c;
		}
		else
		{
			return 0;
		}
	}
}
